<?php

class openapi_api_params_v1_aftersales extends openapi_api_params_abstract implements openapi_api_params_interface{
 	
 	public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }
	
	public function getAppParams($method){
        $params = array(
            'gorefund'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'order_id' => array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'has_receipt' => array('required'=>'false','type'=>'string','name'=>'是否已收到货'),
                'is_need_return' => array('required'=>'false','type'=>'string','name'=>'是否需要退货'),
            ),
            'return_save'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'return_type' => array('required'=>'false','type'=>'string','name'=>'退款类型'),
                'products' => array('required'=>'true','type'=>'json','name'=>'商品信息',
                	'items'=>array(
                		'goods_id'=>array('required'=>'true','type'=>'string','name'=>'商品ID'),
                		'bn'=>array('required'=>'true','type'=>'string','name'=>'商品编号'),
                		'name'=>array('required'=>'true','type'=>'string','name'=>'商品名称'),
                		'quantity'=>array('required'=>'true','type'=>'string','name'=>'商品数量'),
                	),
                ),
                'order_id'=>array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'gorefund_price'=>array('required'=>'true','type'=>'string','name'=>'退款金额'),
                'comment'=>array('required'=>'true','type'=>'string','name'=>'退款原因'),
                'content'=>array('required'=>'false','type'=>'string','name'=>'退款说明'),
                'image_file'=>array('required'=>'false','type'=>'string','name'=>'凭证图片'),
                'image_file1'=>array('required'=>'false','type'=>'string','name'=>'凭证图片1'),
                'image_file2'=>array('required'=>'false','type'=>'string','name'=>'凭证图片2'),
            ),
            'goreship'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'order_id'=>array('required'=>'true','type'=>'string','name'=>'订单ID'),
            ),
            'reshipped'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'order_id'=>array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'addr_id'=>array('required'=>'true','type'=>'int','name'=>'退货地址id'),
                'return_id'=>array('required'=>'false','type'=>'string','name'=>'return_id'),
                'logi_id'=>array('required'=>'true','type'=>'int','name'=>'物流公司'),
                'logi_no'=>array('required'=>'true','type'=>'string','name'=>'物流单号'),
                'money'=>array('required'=>'false','type'=>'string','name'=>'配送费用'),
                'memo'=>array('required'=>'false','type'=>'string','name'=>'发货说明'),
            ),
            'myrefund'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'npage' => array('required'=>'false','type'=>'int','name'=>'页码'),
            ),
            'subrefund'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'npage' => array('required'=>'false','type'=>'int','name'=>'页码'),
            ),
            'return_details'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退货退款ID'),
            ),
            'do_return'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'return_type' => array('required'=>'false','type'=>'string','name'=>'退款类型'),
            ),
            'do_agree_return'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退款单ID'),
                'deladdress' => array('required'=>'true','type'=>'string','name'=>'退货地址ID'),
                'seller_comment'=>array('required'=>'false','type'=>'string','name'=>'卖家留言'),
            ),
            'do_noagree_return'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'退款订单ID'),
                'seller_reason'=>array('required'=>'false','type'=>'string','name'=>'拒绝原因'),
            ),
            'send_finish'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退款单ID'),
                'refuse'=>array('required'=>'false','type'=>'string','name'=>'是否拒绝'),
                'seller_reason'=>array('required'=>'false','type'=>'string','name'=>'拒绝原因'),
            ),
            'return_refuse'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退款单ID'),
            ),
            'intereven'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
                'comment'=>array('required'=>'true','type'=>'string','name'=>'退款原因'),
                'phone'=>array('required'=>'true','type'=>'string','name'=>'手机号'),
                'mail'=>array('required'=>'true','type'=>'string','name'=>'邮箱'),
            ),
            'edit_refund'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
            ),
            'do_agree'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退款单ID'),
            ),
            'do_send'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退款单ID'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
            ),
            'safeguard_add'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'order_id' =>array('required'=>'true','type'=>'string','name'=>'订单ID'),
            ),
            'seller_update'=>array(
                'login_token' => array('required'=>'true','type'=>'string','name'=>'登录状态token'),
                'return_id' =>array('required'=>'true','type'=>'string','name'=>'退货退款ID'),
            ),
            'seller_intereven'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'return_id'=>array('required'=>'false','type'=>'string','name'=>'退款单ID'),
                'content'=>array('required'=>'false','type'=>'string','name'=>'留言'),
                'image_file'=>array('required'=>'false','type'=>'string','name'=>'凭证图片'),
                'image_file1'=>array('required'=>'false','type'=>'string','name'=>'凭证图片1'),
                'image_file2'=>array('required'=>'false','type'=>'string','name'=>'凭证图片2'),
            ),
        );

        return $params[$method];
    }
    
    public function description($method){
        $desccription = array(
            'gorefund'=>array(
                'name'        =>'获取退货退款页面',
                'description' =>'获取退货退款页面接口',
            ),
            'return_save'=>array(
                'name'        =>'提交退货退款接口',
                'description' =>'提交退货退款接口',
            ),
            'goreship'=>array(
                'name'        =>'获取退货信息页面',
                'description' =>'获取退货信息页面接口',
            ),
            'reshipped'=>array(
                'name'=>'提交退货信息接口',
                'description' =>'提交退货信息接口',
            ),
            'myrefund'=>array(
                'name'=>'我的退货提款',
                'description' =>'我的退货提款',
            ),
            'subrefund'=>array(
                'name'=>'我的退货提款',
                'description' =>'我的退货提款',
            ),
            'return_details'=>array(
                'name'=>'退货提款详情',
                'description' =>'退货提款详情',
            ),
            'do_return'=>array(
                'name'=>'处理退货提款',
                'description' =>'处理退货提款',
            ),
            'do_agree_return'=>array(
                'name'=>'同意退货退款接口',
                'description' =>'同意退货退款接口',
            ),
            'do_noagree_return'=>array(
                'name'=>'拒绝退货退款接口',
                'description' =>'拒绝退货退款接口',
            ),
            'send_finish'=>array(
                'name'=>'收到退货并退款接口',
                'description' =>'收到退货并退款接口',
            ),
            'return_refuse'=>array(
                'name'=>'撤销申请',
                'description' =>'撤销申请',
            ),
            'intereven'=>array(
                'name'=>'申请平台介入',
                'description' =>'申请平台介入',
            ),
            'edit_refund'=>array(
                'name'=>'修改退货退款申请',
                'description' =>'修改退货退款申请',
            ),
            'do_agree'=>array(
                'name'=>'商家同意退款申请',
                'description' =>'商家同意退款申请',
            ),
            'do_send'=>array(
                'name'=>'商家拒绝退款申请并继续发货',
                'description' =>'商家拒绝退款申请并继续发货',
            ),
            'safeguard_add'=>array(
                'name'=>'申请售后',
                'description' =>'申请售后',
            ),
            'seller_update'=>array(
                'name'=>'获取卖家举证页面数据',
                'description' =>'获取卖家举证页面数据',
            ),
            'seller_intereven'=>array(
                'name'=>'卖家提交举证',
                'description' =>'卖家提交举证',
            ),
        );
        return $desccription[$method];
    }

}